#ifndef __UP_CONFIG_H__
#define __UP_CONFIG_H__

#define GD32F470 1
#define USE_STDPERIPH_DRIVER 1

/**
 * \brief config usart recv callback
 *      if 1 , must implement on_usart_data_received function
 */
#define USE_USART_RECV_CALLBACK 0


#if defined (GD32F405) || defined (GD32F407) || defined (GD32F425) || defined (GD32F427) || defined (GD32F450) || defined (GD32F470)
#include "UP_GD32F4xx.h"
#include "UP_default.h"

///=============== normal ================
#define UP_uint			uint32_t

///=============== GPIO ==================
#define UP_GPIO			UP_GPIO_t
#define UP_GPIO_CFG	UP_GPIO_Config

///=============== USART =================
#define UP_USART        UP_USART_t
#define UP_USART_CFG	UP_USART_Config

#endif

#if defined (STC8H)
#include "UP_STC8Hxx.h"

/////////// normal /////////////////
#define UP_uint			uint8_t

/////////// GPIO //////////////////
#define UP_GPIO			UP_GPIO
#define UP_GPIO_CFG     UP_GPIO_Config

#endif







#endif // !__UP_CONFIG_H__
